Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localize "Read More" link #16665

Merged
merged 1 commit into from
Jul 22, 2019
Merged

Localize "Read More" link #16665

merged 1 commit into from
Jul 22, 2019

Conversation

them-es
Copy link
Contributor

@them-es them-es commented Jul 18, 2019

Description

Translation for the optional "Read More" link was missing

How has this been tested?

Screenshots

Types of changes

Untranslated string has been made translatable using __()

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.

@swissspidy swissspidy added [Type] Bug An existing feature does not function as intended Internationalization (i18n) Issues or PRs related to internationalization efforts labels Jul 22, 2019
@swissspidy
Copy link
Member

Looks like it was introduced in #14627.

@swissspidy swissspidy merged commit ac13013 into WordPress:master Jul 22, 2019
@github-actions github-actions bot added this to the Gutenberg 6.2 milestone Jul 22, 2019
@them-es them-es deleted the update/latest-posts branch July 23, 2019 09:23
@them-es
Copy link
Contributor Author

them-es commented Aug 1, 2019

@swissspidy Thanks for merging this pull request. The "Read More" string gets translated in the WordPress Editor now 👍 (Gutenberg v6.2 with updated translation files) but I noticed that the Frontend still shows the untranslated string from the server side code here:
https://github.com/WordPress/gutenberg/blob/master/packages/block-library/src/latest-posts/index.php#L70

Can you confirm this behavior? Any clue why the PHP string translation does not work?

@swissspidy
Copy link
Member

@them-es Can you please open a new issue for that? Since the PHP files use the default text domain, WordPress looks for the translation of "Read More" in its own translations. However, WordPress core only uses "Read more" with a lowercase M, so that doesn't work.

There are two possible solutions:

  1. Use "Read more" with lowercase M everywhere.
  2. Update PHP code to add Gutenberg text domain.

Or perhaps just both :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Internationalization (i18n) Issues or PRs related to internationalization efforts [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants